package com.cmy.scheduleLite.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author : Cmy
 * @date : 2025-04-09 8:54
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ScheduleSetting {

    private Long jobId;

    /**
     * bean名称
     */
    private String beanName;

    /**
     * 方法名称
     */
    private String methodName;

    /**
     * 方法参数
     */
    private String methodParams;

    /**
     * cron表达式
     */
    private String cronExpression;

    /**
     * 状态（1正常 0暂停）
     */
    private Integer jobStatus;


    @Override
    public String toString() {
        return String.format(
                "{\n" +
                        "  \"jobId\": %d,\n" +
                        "  \"beanName\": \"%s\",\n" +
                        "  \"methodName\": \"%s\",\n" +
                        "  \"methodParams\": \"%s\",\n" +
                        "  \"cronExpression\": \"%s\",\n" +
                        "  \"jobStatus\": %d\n" +
                        "}",
                jobId, beanName, methodName, methodParams, cronExpression, jobStatus
        );
    }


}

    